<template>
  <div>
    <div class="search">
      <input type="text" placeholder="搜索关键字" v-model="searchWord">
      <img src="./search.png" alt="" @click="search">
    </div>
  </div>
</template>

<script>
export default {
  name: 'search',
  data () {
    return {
      searchWord: ''
    }
  },
  methods: {
    search () {
      console.log(11)
      this.$emit('search', this.searchWord)
    }
  },
  actived () {
    // console.log(currentAbout)
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss">
.search {
  margin-bottom: 42px;
  position: relative;
  input {
    width: 340px;
    height: 50px;
    background-color: #f2f2f2;
    box-shadow: inset 0px 3px 5px 0px rgba(107, 107, 107, 0.1);
    border-radius: 18px;
    color: #999;
    font-size: 16px;
    text-indent: 27px;
    outline: none;
    border: 0
  }
  img {
    position: absolute;
    right: 27px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer
  }
}
</style>
